//
//  SHITabBar.m
//  诗韵
//
//  Created by Song on 2017/12/25.
//  Copyright © 2017年 Song. All rights reserved.
//

#import "SHITabBar.h"

@implementation SHITabBar

-(void)layoutSubviews {
    [super layoutSubviews];
    

    CGFloat buttonW = self.frame.size.width / 4;
    CGFloat buttonH = self.frame.size.height;
    CGFloat buttonY = 0;
    
    // 索引
    CGFloat index = -1;
    for (UIView *subView in self.subviews) {

        CGFloat buttonX = index * buttonW;
        
        // 设置frame
        subView.frame = CGRectMake(buttonX, buttonY, buttonW, buttonH);

        NSLog(@" - %@ - ",NSStringFromCGRect(subView.frame));
        index ++;
    }
    
    
}

@end
